package demo.ssh2;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.jcraft.jsch.UserInfo;

/**
 * @author mandy.hu
 * 
 */
public class SSHUserInfo implements UserInfo {

    private static final Logger logger = LoggerFactory.getLogger(SSHUserInfo.class);

    private String password;

    private String passphrase;

    @Override
    public String getPassphrase() {
        return null;
    }

    @Override
    public String getPassword() {
        return null;
    }

    @Override
    public boolean promptPassphrase(final String message) {
        return false;
    }

    @Override
    public boolean promptPassword(final String message) {
        return false;
    }

    @Override
    public boolean promptYesNo(final String arg0) {
        if (arg0.contains("The authenticity of host")) {
            return true;
        }
        return false;
    }

    @Override
    public void showMessage(final String arg0) {

        logger.debug("SSHUserInfo.showMessage()");
    }
}
